﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TypingG
{
    public partial class DataBaseTable : Form
    {
        private MainMenu menu = new MainMenu();
        public DataBaseTable()
        {
            InitializeComponent();
            onmenu();
        }
        private void onmenu()
        {
            MenuItem item1 = new MenuItem("Quản Lý Nhân Viên");
            MenuItem item1_1 = new MenuItem("Danh Sách Nhân Viên");
            item1_1.Click += new EventHandler(item1_1_Click);
            item1.MenuItems.Add(item1_1);
            MenuItem item2 = new MenuItem("Quản Lý Khách Hàng");
            MenuItem item2_1 = new MenuItem("Danh Sách Khách Hàng");
            item2_1.Click += new EventHandler(item2_1_Click);
            item2.MenuItems.Add(item2_1);
            MenuItem item3 = new MenuItem("Quản Lý Account");
            
            MenuItem item3_1 = new MenuItem("Danh Sách Account");
            item3_1.Click += new EventHandler(item3_1_Click);
            MenuItem item3_2 = new MenuItem("Thông Tin Account");
            item3_2.Click += new EventHandler(item3_2_Click);
            item3.MenuItems.Add(item3_1);
            item3.MenuItems.Add(item3_2);

            menu.MenuItems.Add(item1);
            menu.MenuItems.Add(item2);
            menu.MenuItems.Add(item3);
            this.Menu = menu;


        }

        void item3_2_Click(object sender, EventArgs e)
        {
            SQLServer.ShowData(this.dg, "CapDoTaiKhoan");
           
        }

        void item3_1_Click(object sender, EventArgs e)
        {
            SQLServer.ShowData(this.dg, "TaiKhoan");
        }

        void item2_1_Click(object sender, EventArgs e)
        {
            SQLServer.ShowData(this.dg, "KhachHang");
        }

        void item1_1_Click(object sender, EventArgs e)
        {
            SQLServer.ShowData(this.dg, "NhanVienIT");
        }
    }
}
